package com.hhd.dao;

import com.hhd.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {

    @Select("select * from user")
    public List<User> getUser();

    @Insert("insert into user (id,name,pwd) values (#{id},#{name},#{pwd})")
    public int addUser(User user);

    @Update("update user set name=#{name},pwd=#{pwd} where id = #{id}")
    public int updateUser (User user);

    @Delete("delete from user where id=#{id}")
    public int deleteUser(@Param("id")int id);

}